package cn.snmp.mutual.nms;

import java.io.*;

public class SnmpException extends Exception implements Serializable
{
    public SnmpException() {
    }
    
    public SnmpException(final String s) {
        super(s);
    }
    
    public static String exceptionString(final byte byte0) {
        switch (byte0) {
            case 0: {
                return SnmpUtils.getString("No Error.");
            }
            case 1: {
                return SnmpUtils.getString("Response message would have been too large.");
            }
            case 2: {
                return SnmpUtils.getString("There is no such variable name in this MIB.");
            }
            case 3: {
                return SnmpUtils.getString("The value given has the wrong type or length.");
            }
            case 4: {
                return SnmpUtils.getString("This variable is read only.");
            }
            case 5: {
                return SnmpUtils.getString("A general failure occured.");
            }
            case 6: {
                return SnmpUtils.getString("A no access error occured");
            }
            case 7: {
                return SnmpUtils.getString("A wrong type error occured.");
            }
            case 8: {
                return SnmpUtils.getString("A wrong length error occured.");
            }
            case 9: {
                return SnmpUtils.getString("A wrong encoding error occured.");
            }
            case 10: {
                return SnmpUtils.getString("A wrong value error occured.");
            }
            case 11: {
                return SnmpUtils.getString("A no creation error occured.");
            }
            case 12: {
                return SnmpUtils.getString("An inconsistent value error occured.");
            }
            case 13: {
                return SnmpUtils.getString("A resource unavailable error occured.");
            }
            case 14: {
                return SnmpUtils.getString("A commit failed error occured.");
            }
            case 15: {
                return SnmpUtils.getString("A undo failed error occured.");
            }
            case 16: {
                return SnmpUtils.getString("A authorization failed  error occured.");
            }
            case 17: {
                return SnmpUtils.getString("A not writable error occured.");
            }
            case 18: {
                return SnmpUtils.getString("An inconsistent name error occured.");
            }
            case Byte.MIN_VALUE: {
                return SnmpUtils.getString("There is no such object in this MIB.");
            }
            case -127: {
                return SnmpUtils.getString("There is no such instance in this MIB.");
            }
            case -126: {
                return SnmpUtils.getString("This is a end of Mib View.");
            }
            default: {
                return SnmpUtils.getString("I don't know what occured.");
            }
        }
    }
}
